import tpl from './index.tpl'
import './index.scss'

import { tplReplace } from '../../../utils'

export default (swipers) => {

    return {
        name: 'indicator',
        tpl() {
            let list = ''
            let indicatorNum = swipers.length
            for (let i = 0; i < indicatorNum; i++) {
                let oli = '<li><button></button></li>'
                list += oli
            }

            list = '<ul class="indicator-list">' + list + '</ul>'
                       
            return tplReplace(tpl, {
                indicator: list
            })

        }
    }
}